package com.cxlin.base.view.recyclerview

/**
 *
 * @Author: chenxunlin
 * @Date: 2024/4/26 13:49
 */
class SimpleAdapter<T : BaseItem>(
    layoutId: Int,
    handler: Handler<T>? = null,
    val onBind: ((holder: ViewHolder<T>, position: Int, item: T) -> Unit)? = null
) :
    BaseAdapter<T>(layoutId, handler) {

    override fun onBindViewHolder(holder: ViewHolder<T>, position: Int) {
        onBind?.invoke(holder, position, getItem(position))
        super.onBindViewHolder(holder, position)
    }
}